home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / System-Boost / Grafik / raystorm_2.22 / Patch < prev    next >
Text File  |  1998-11-08  |  3KB  |  129 lines

  1. ;**************************************************************************
  2. ; Patch - RayStorm patch script
  3. ;
  4. ; Copyright © 1998 Andreas Heumann
  5. ;
  6. ; $Id: Patch,v 1 10/22/1998
  7. ;
  8. ;     Installer and Installer project icon
  9. ;     (c) Copyright 1991-93 Commodore-Amiga, Inc.  All Rights Reserved.
  10. ;     Reproduced and distributed under license from Commodore.
  11. ;
  12. ;     INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  13. ;     NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  14. ;     OR RESPONSIBILITY IS ASSUMED.
  15. ;
  16. ;**************************************************************************
  17. (welcome "Welcome to the " @app-name " patch.\n")
  18.  
  19. (set #old-vers "2.2")
  20. (set #new-vers "2.22")
  21.  
  22. ; The source directory name
  23. (set #source-dir
  24.  (if (= 1 (exists @icon))
  25.   (pathonly (expandpath @icon))
  26.   (expandpath @icon)
  27.  )
  28. )
  29.  
  30. ;**************************************************************************
  31. ; Select directory where RayStorm is installed.
  32. ;**************************************************************************
  33. (procedure P_select-directory
  34.  (transcript "Selecting " @app-name ".")
  35.  (set @default-dest
  36.   (askdir
  37.    (prompt "Select directory where " @app-name "is installed.\n")
  38.    (help "Here you have to specify location where " @app-name "is installed.\n")
  39.    (newpath)
  40.    (default #source-dir)
  41.   )
  42.  )
  43. )
  44.  
  45. ;**************************************************************************
  46. ; ask if the old file should be saved
  47. ;**************************************************************************
  48. (procedure P_save-old
  49.  (if (= 1 (exists (tackon @default-dest "libs/raystormppc.library")))
  50.   (if(askbool
  51.    (prompt "Shall I save the old files?\n")
  52.    (help "The files are saved in the directory 'old_" #old-vers "', if\n."
  53.     "you select no, the old files are deleted.\n"
  54.    )
  55.    (default 0))
  56.    (
  57.     (makedir (tackon @default-dest (cat "old_" #old-vers)))
  58.     (copyfiles
  59.      (source (tackon @default-dest "libs/raystormppc.library"))
  60.      (dest (tackon @default-dest (cat "old_" #old-vers)))
  61.     )
  62.    )
  63.   )
  64.  )
  65. )
  66.  
  67. ;**************************************************************************
  68. ; Installatation sequence
  69. ;**************************************************************************
  70. (message "This script patches RayStorm version " #old-vers " to version " #new-vers ".\n")
  71.  
  72. (complete 00)
  73. (transcript "On patching " @app-name " " #old-vers ".")
  74. (P_select-directory)
  75.  
  76. (complete 10)
  77. (set #choice
  78.  (askchoice
  79.   (prompt "Please select which CPU version you want to patch.\n")
  80.   (help "The patch is only working if you select the correct version.\n")
  81.   (choices "020/881" "040" "060" "PowerPC")
  82.  )
  83. )
  84. (if (= 0 #choice)
  85.  (
  86.   (set #filename "raystorm.library")
  87.   (set #patch "patch881")
  88.  )
  89. )
  90. (if (= 1 #choice)
  91.  (
  92.   (set #filename "raystorm.library")
  93.   (set #patch "patch040")
  94.  )
  95. )
  96. (if (= 2 #choice)
  97.  (
  98.   (set #filename "raystorm.library")
  99.   (set #patch "patch060")
  100.  )
  101. )
  102. (if (= 3 #choice)
  103.  (
  104.   (set #filename "raystormppc.library")
  105.   (set #patch "patchppc")
  106.  )
  107. )
  108.  
  109. (complete 15)
  110. (P_save-old)
  111.  
  112. (complete 20)
  113. (working "Patching " (cat "libs/" #filename))
  114. (if (> 0 (run (cat "gpatch " (tackon @default-dest (cat "libs/" #filename)) " " #patch " " (tackon "t:" #filename))))
  115.  (abort "Patch failed! Maybe you tried to patch the wrong version.")
  116. )
  117. (copyfiles
  118.  (source (tackon "t:" #filename))
  119.  (dest (tackon @default-dest "libs"))
  120. )
  121. (delete (tackon "t:" #filename))
  122.  
  123. (complete 100)
  124. (message "Successfully finished patching of " @app-name ".\n")
  125.  
  126. ;;; All done!
  127.  
  128. ; EOF
  129.